window: Use CAIRO_OPERATOR_SOURCE to clear to background
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 14 Jul 2014 22:58:27 +0000 (18:58 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 14 Jul 2014 23:14:40 +0000 (19:14 -0400)
Some windows, like GtkWindow and some other apps, set a transparent
background. The guarantee for begin_paint_region is that there should
be a full clear to the specified background color, not a composite
against what was there before.

This fixes repaint artifacts in Wayland and Weston in a better way than
76922c169f0699d9b85ef3eff2170f2cede1782c.

gdk/gdkwindow.c

index 2ae5a6988bcabe7485d05af55f298f436b8d7b2b..04e3d0a27bdb52a69459a415b9aae2d0f5988304 100644 (file)
@@ -2974,6 +2974,7 @@ gdk_window_clear_backing_region (GdkWindow *window)
   else
     cairo_set_source_rgb (cr, 0, 0, 0);
 
+  cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
   gdk_cairo_region (cr, window->current_paint.region);
   cairo_fill (cr);